package org.stvd.repository.oauth;

import java.util.List;
import java.util.Map;

import org.stvd.core.dto.QueryResult;
import org.stvd.entities.oauth.OauthAccessToken;
import org.stvd.repository.base.BaseDao;

/**
 * 授权Token Repository接口类
 * @author sunzhifeng
 */
public interface OauthAccessTokenDao extends BaseDao<OauthAccessToken>{

    /**
     * token查询
     * @param start
     * @param limit
     * @param user_name
     * @param client_id
     * @param grant_type 授权类型，password,client_credentials
     * @return
     */
    QueryResult<Map<String, Object>> queryAccessTokenResult(int start, int limit, String user_name, String client_id, String grant_type);

    /**
     * 查询token列表
     * @param userName 用户ID
     * @return
     */
    List<Map<String, Object>> listAccessToken(String userName);
}
